package de.koller.renderEngine.render.geom;

import org.lwjgl.opengl.GL11;

public class CubeRenderer {
	
	public void render( float posX, float posY, float w, float h, float r ) {
		GL11.glColor3f( 1, 1, 1 );
		
		GL11.glPushMatrix();
		GL11.glTranslatef( posX, posY, 0 );
		GL11.glRotatef( r, 0, 0, 1 );
		
		GL11.glBegin( GL11.GL_LINE_LOOP ); {
			GL11.glVertex2f( - w/2, - h/2 );
			GL11.glVertex2f( - w/2, + h/2 );
			GL11.glVertex2f( + w/2, + h/2 );
			GL11.glVertex2f( + w/2, - h/2 );
		} GL11.glEnd();
		
		GL11.glPopMatrix();
	}
	
}
